<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/23
  Time: 17:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改书籍</title>

    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

    <div class="row-clearfix">
        <div class="col-md-12 colum">
            <div class="page-header">
                <h1>
                    <small>修改书籍</small>
                </h1>
            </div>
        </div>
    </div>
    <form action="${pageContext.request.contextPath}/book/update?bookId=${QBook.bookId}" method="post">
        <%--容易出现的问题：更新需要依据id，但是id没有传回后台，所以更新不了，sql执行不了--%>
        <%--使用隐藏域传id--%>
<%--            <input type="hidden" name="bookID" value="${QBook.bookId}">--%>
<%--                <div class="form-group">--%>
<%--                <label>书籍名称</label>--%>
<%--                <input type="text" name="bookName" class="form-control" value="${QBook.bookName}" required>--%>
<%--            </div>--%>
<%--            <div class="form-group">--%>
<%--                <label>书籍价格</label>--%>
<%--                <input type="text" name="bookCounts" class="form-control" value="${QBook.bookPrice}" required>--%>
<%--            </div>--%>
<%--            <div class="form-group">--%>
<%--                <label>书籍封皮图片信息</label>--%>
<%--                <input type="text" name="detail" class="form-control" value="${QBook.bookFptpmessage}" required>--%>
<%--            </div>--%>
<%--            <div class="from-group">--%>
<%--                <input type="submit" class="form-control" value="修改">--%>
<%--            </div>--%>
            <table class="table table-hover">
                <tr>
                    <div class="form-group">
                        <td>书籍名称</td>
                        <td><input type="text" name="bookName" value="${QBook.bookName}" class="form-control"/></td>
                    </div>

                </tr>
                <tr>
                    <div class="form-group">
                        <td>书籍价格</td>
                        <td><input type="number" name="bookPrice" value="${QBook.bookPrice }" class="form-control"/></td>
                    </div>

                </tr>
                <tr>
                    <div class="form-group">
                        <td>书籍封皮图片信息</td>
                        <td><input type="text" name="bookFptpmessage" value="${QBook.bookFptpmessage}" class="form-control"/></td>
                    </div>

                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" value="修改"/>
                    </td>
                </tr>
            </table>
    </form>
</div>
</body>
</html>